/*
 * @Author: Setsuna
 * @Email: setsuna.xyz@qq.com
 * @FilePath: \src\pages\StatementOfAccount\SendStatementOfAccount\components\TextAreaView.tsx
 * @Date: 2022-03-15 10:06:50
 * @LastEditTime: 2022-03-16 11:49:30
 */
import { Button, Col, Row } from 'antd'
import TextArea from 'antd/lib/input/TextArea'
import React from 'react'

interface props {
  buttonText?: string
  buttonClick: () => void
  disabled?: boolean
  placeholder?: string
}

const TextAreaView = (props: props) => {
  const { buttonText = '选择经销商', buttonClick, ...rest } = props
  return (
    <Row>
      <Col span={20}>
        <TextArea rows={5} {...rest} />
      </Col>
      <Col span={3} offset={1}>
        <Button type="primary" onClick={buttonClick}>
          {buttonText}
        </Button>
      </Col>
    </Row>
  )
}

const TextAreaViewRef = React.forwardRef((props: any, ref) => {
  return <TextAreaView {...props} />
})

export default React.memo(TextAreaViewRef)
